import { request } from '@/plugins/axios'
import { OrgList } from './interface'
import { transOrg } from './translator'

export const fetchOrg = async (meetingMoid: string) =>
	request<OrgList>({
		url: `/mcc/${meetingMoid}/mts`,
		method: 'get',
	}).then((res) => (res.success && res.list ? res.list.map((x) => transOrg(x)) : undefined))
